<template>
  <div class="product">
    <el-row type="flex" justify="space-around" align="middle">
      <el-col :span="8">
        <el-card shadow="always">
          <img src="../assets/carLoan.jpg" class="image">
          <div style="padding: 14px;">
            <span>车抵贷</span>
            <div class="bottom clearfix">
              <el-button type="text" class="button" @click="carButton">选择车抵贷</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8" :offset="1">
        <el-card shadow="always">
          <img src="../assets/houseLoan.jpg" class="image">
          <div style="padding: 14px;">
            <span>房抵贷</span>
            <div class="bottom clearfix">
              <el-button type="text" class="button" @click="houseButton">选择房抵贷</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import router from '../router'
export default {
  name: 'Product',
  data () {
    return {

    }
  },
  mounted(){
    this.$store.commit('title', '选择产品')
  },
  methods: {
    carButton(){
      sessionStorage.setItem('productId','car')
      router.push({name: 'User'})
      this.$store.commit('title', '读取身份证')
    },
    houseButton(){
      sessionStorage.setItem('productId','house')
      router.push({name: 'User'})
      this.$store.commit('title', '读取身份证')
    }
  },
}
</script>

<style lang="scss" scoped>
  .time {
    font-size: 13px;
    color: #999;
  }
  
  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }

  .button {
    padding: 0;
    float: right;
  }

  .image {
    width: 100%;
    display: block;
  }

  .clearfix:before,
  .clearfix:after {
      display: table;
      content: "";
  }
  
  .clearfix:after {
      clear: both
  }
  .product{
    margin-top: 40px;
  }
  .el-row{
    flex-wrap: wrap;
  }
  .el-col{
    margin-top: 40px;
  }
  span{
    font-size: 22px;
    color: #666;
  }
  .el-button{
    font-size: 18px;
  }
</style>
